<?php
namespace app\admin\validate;
use think\Validate;
class Icon extends Validate
{
    // 验证规则
    protected $rule = [
    //图片验证，格式为jpg，png，gif，小于2M
// 'webImg' =>"file|fileMime:image/png,image/jpeg,image/gif,image/x-png|fileSize:2097152",
        'icon' =>['fileMime:image/png'],
        
    ];

    // 提示信息
    protected $message = [
        'icon.require' => '图片不能为空',
        'icon.image' => '文件类型只可以是png,jpg,jpeg,gif',
'webImg.size:2048' => '上传图片不得大于2M',
    ];

}





